﻿using UnityEngine;
using UnityEditor;
using Memo.Electricity.Game;

namespace Memo.Electricity.Editor
{
	[CustomEditor(typeof(CSwitch))]
	public class SwitchEditor : UnityEditor.Editor
	{
		private CSwitch mSwitch;
		private void OnEnable()
		{
			mSwitch = target as CSwitch;
		}

		private void OnSceneGUI()
		{
			if (mSwitch.Target != null)
			{
				Handles.color = Color.red;
				Handles.DrawDottedLine(mSwitch.transform.position, mSwitch.Target.transform.position, 10);
			}
		}


	}
}